home *** CD-ROM | disk | FTP | other *** search
- /* This file is herosona.c */
- /*
- Functions in this file:
- 1. sonar_on turn on the sonar
- 2. sonar_read read the sonar, return as an int
- 3. ck_sonar wait until sonar is finished its last cycle.
- */
- /* !!!!!!only replace herosona.asm if you read in rmtkey.asm code also!!!*/
- #include <hero.h>
-
- sonar_on()
- {
- hero_call(ENABLE_SONAR);
- }
-
- sonar_read()
- {
- return( hero_call(READ_SONAR));
- }
-
-
- /* wait until sonar is finished */
- ck_sonar()
- {
- #asm
- ck_s1: LDAA sonar_st ; IS SONAR FINISHED?
- BEQ *+2+$03
- SWI ;WAIT UNTIL IT IS
- BRA ck_s1
- #endasm
- }
-
-
-